! }}
// Parameter description (sent to, subject, content, additional information, user name)Smtp_mail ('yourmail @ cgsir.com ',' Welcome to cgsir.com! ', 'Null', 'cgsir. com', 'username ');
?>
Note:1. Set the character set of the email, $ mail-> charset = "gb2312"; // specify the character set here! Here I only specify it as gb2312 because outlook can display the m
Use smtp.163.com to send mail (local serverless) Step 1: Download phpmailerfile package phpmailer-1.73.tar.gz from open source community: http://phpmailer.sourceforge.net/
Step 2: Check whether your server system supports socket, for example, phpinfo ();
If you do not have this option, note that socket is an extension of PHP, and a configuration option for./configure -- enable-sockets must be given during c
, additional information, user name)Smtp_mail ('yourmail @ cgsir.com ',' Welcome to cgsir.com! ', 'Null', 'cgsir. com', 'username ');?>Note:1. Set the character set of the email, $ mail-> CharSet = "GB2312"; // specify the character set here! Here I only specify it as GB2312 because Outlook can display the mail subject normally, I tried to set it to UTF-8, but ga
Require_once ('.. /class.phpmailer.php ');
$mail = new Phpmailer ();
$body = "I finally sent the mail successfully!" Oh! Goodboy xxxxxxx! Send mail with SMTP
$mail->issmtp ();
Mail server
$mail->host = "smtp.126.
Require_once ('.. /class.phpmailer.php ');
$mail = new Phpmailer ();
$body = "I finally sent the mail successfully!" Oh! Goodboy xxxxxxx!
Http://news.qq.com/a/20111115/000792.htm?qq=0ADUIN=594873950ADSESSION=1321316731ADTAG=CLIENT. qq.3493_.0 ";
Send mail with SMTP
$mail->issmtp ();
During myeclipse development, the following errors may occur during runtime:
Exception in thread "Main" Java. Lang. noclassdeffounderror: COM/Sun/mail/util/lineinputstream
The reason is that the jar package version is inconsistent. javamail conflicts with the packages in Java ee 5 libraries/javaee. Jar/mail.
The interface package in javamail1.4 conflicts
Recently in writing a successful registration, the need for mail activation of the Web registration function, so the use of NetEase server smtp.163.com as a server host to send mail to registered users. In the process of debugging the old connection failed to encounter the exception (because it is done, forgot to copy the exception information, so no).Throughout
Writing emailsProgramAn error is reported!
The main reason is that
Javax. mail and javax. the activation packages belong to the basic package in javaee5, that is, they are included in JDK, but the methods in them are similar to the existing Mail. jar and activation. jar has some differences, so beginners are copying others directly.CodeWhen the above error occurs.The following is a solution.Enter
X:/
ArticleDirectory
Cause of exception:
Solution:
Exception in thread "Main" Java. Lang. noclassdeffounderror: COM/Sun/mail/util/lineinputstreamCause of exception:
The Java EE version is different from that of javamail.For example, if javamail 1.3 or lower is on javaee5, the above error will occur, but it will work normally in javaee1.4. (However, I have tried javaee5 + javamail1.4.) Because javaee
An exception is thrown when you use javamail to send an email:
Java. Lang. securityexception: sha1 digest error for COM/Sun/mail/SMTP/smtptransport. Class
I am depressed for a long time, and finally found two problems 1. import all jar files in the project (this is not enough. It can be sent at this time, but an exception will always be reported. For the solution, refer to article 2. add all jar files to
This is a common exception when using the javamail function.
The reason is that the jar package version is inconsistent. The solution is as follows:Delete the packages in Java ee 5 libraries/javaee. Jar/mail.The specific method is as follows:Use RAR to open X:/program files/myeclipse 6.0/myeclipse/Eclipse/plugins/COM. genuitec. Eclipse. j2eedt. core_6.0.1.zmyeclipse601_710/data/libraryset/ee_5/javaee. JarAnd then delete the
This is a common exception when using the javamail function.
The reason is that the jar package version is inconsistent. The solution is as follows:Delete the packages in Java ee 5 libraries/javaee. Jar/mail.The specific method is as follows:Use RAR to open X:/program files/myeclipse 6.0/myeclipse/Eclipse/plugins/COM. genuitec. Eclipse. j2eedt. core_6.0.1.zmyeclipse601_710/data/libraryset/ee_5/javaee. JarAnd then delete the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.